package com.osgix.common.pojo.temp;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 组织机构Bean 继承serializable接口可以在网络中传送
 * @author cuizhihua
 */
public class UserGroup implements Serializable {
	/**
	 * 2008-8-27,上午10:56:53
	 * @author wangkx
	 * @version 2.0
	 *
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 顶级组织机构节点,用于展示,没有具体业务含义
	 */
	public static final String TOP_DEPT_ID = "1";

	/**
	 * 部门ID
	 */
	private String dept_id = "";
	/**
	 * 部门名
	 */
	private String dept_name = "";
	/**
	 * 上级部门
	 */
	private String super_id = "";

	/**
	 * 描述
	 */
	private String node = "";

	/**
	 * 状态 0:正常／１：不可使用 ;
	 */
	private int state = 0;

	//begin  zh   08.8.5
	/**
	 * 完整组织机构ID的DN
	 */
	private String group_dnid = "";//
	/**
	 * 完整组织机构名称DN
	 */
	private String group_dnname = "";//

	/**
	 * 组织机构类型/0：组织机构/1：组
	 */
	private int type = 0;//
	/**
	 * 所属系统；如果 组织织机构类型(type)是组织机构(0)，此属性为空; 如果是(1),此属性不能为空
	 */
	private String app_name = "";//

	/**
	 * 电话
	 */
	private String org_phone = "";//
	/**
	 * 传真
	 */
	private String org_fax = "";//
	/**
	 * 排序,同一节点下的组织机构根据此字段属性进行排序
	 */
	private int org_orderBy = 0;//

	/**
	 * 是否是预置组,0:不是预置组；1：预置组,预置组不允许删除.
	 */
	/**
	 * 是否是预置组
	 */
	private int sys_group = 0;//
	/**
	 * 状态 0：活动/1：删除; 组织机构删除时将状态置为1，正常使用查询时只查询状态为"0"的组织机构
	 */
	private int org_status = 0;//
	/**
	 * 备用属性1
	 */
	private String memo = "";//
	/**
	 * 备用属性2
	 */
	private int memoNum = 0;//

	/**
	 * 备用属性1
	 */
	private String memo1 = "";//

	/**
	 * 备用属性2
	 */
	private String memo2 = "";//

	/**
	 * 备用属性3
	 */
	private String memo3 = "";//

	/**
	 * 备用属性4
	 */
	private String memo4 = "";//

	//end   zh		08.8.5

	/**
	 * 组织机构成员列表,在生成组织机构对象时，也应该同时生成组织机构的成员对象列表
	 */
	private List<GroupUser> leaguers = new ArrayList<GroupUser>();

	private String Super_name = "";

	public String getSuper_name() {
		return Super_name;
	}

	public void setSuper_name(String super_name) {
		Super_name = super_name;
	}

	/**
	 * 克隆
	 */
	public Object clone() {
		Organise newOrganise = new Organise();
		newOrganise.setDept_id(dept_id);
		newOrganise.setDept_name(dept_name);
		newOrganise.setNode(node);
		newOrganise.setState(state);
		newOrganise.setSuper_id(super_id);

		//		begin  zh   08.8.5
		newOrganise.setGroup_dnid(group_dnid);
		newOrganise.setGroup_dnname(group_dnname);
		newOrganise.setType(type);
		newOrganise.setOrg_fax(org_fax);
		newOrganise.setOrg_orderBy(org_orderBy);
		newOrganise.setOrg_phone(org_phone);
		newOrganise.setOrg_status(org_status);
		newOrganise.setSys_group(sys_group);
		newOrganise.setApp_name(app_name);
		newOrganise.setMemo(memo);
		newOrganise.setMemoNum(memoNum);

		newOrganise.setMemo1(memo1);
		newOrganise.setMemo2(memo2);
		newOrganise.setMemo3(memo3);
		newOrganise.setMemo4(memo4);
		List<GroupUser> legs = new ArrayList<GroupUser>(leaguers);
		newOrganise.setLeaguers(legs);

		return newOrganise;
	}

	/**
	 * 构造函数
	 *
	 */
	public UserGroup() {

	}

	/**
	 * 构造函数
	 * @param deptID 部门ＩＤ
	 */
	public UserGroup(String deptID) {
		this.dept_id = deptID;
	}

	/**
	 * 构造函数
	 * @param deptID
	 * @param name
	 * @param superID
	 * @param desc
	 * @param state
	 */
	public UserGroup(String deptID, String name, String superID, String desc, int state) {
		this.dept_id = deptID;
		this.dept_name = name;
		this.super_id = superID;
		this.node = desc;
		this.state = state;
	}

	public String getDept_id() {
		return dept_id;
	}

	public void setDept_id(String dept_id) {
		this.dept_id = dept_id;
	}

	public String getDept_name() {
		return dept_name;
	}

	public void setDept_name(String dept_name) {
		this.dept_name = dept_name;
	}

	public String getNode() {
		return node;
	}

	public void setNode(String node) {
		this.node = node == null ? "" : node;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getSuper_id() {
		return super_id;
	}

	public void setSuper_id(String super_id) {
		this.super_id = super_id;
	}

	public String getApp_name() {
		return app_name;
	}

	public void setApp_name(String app_name) {
		this.app_name = app_name;
	}

	public String getGroup_dnid() {
		return group_dnid;
	}

	public void setGroup_dnid(String group_dnid) {
		this.group_dnid = group_dnid;
	}

	public String getGroup_dnname() {
		return group_dnname;
	}

	public void setGroup_dnname(String group_dnname) {
		this.group_dnname = group_dnname;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getOrg_fax() {
		return org_fax;
	}

	public void setOrg_fax(String org_fax) {
		this.org_fax = org_fax == null ? "" : org_fax;
	}

	public String getOrg_phone() {
		return org_phone;
	}

	public void setOrg_phone(String org_phone) {
		this.org_phone = org_phone == null ? "" : org_phone;
	}

	public int getOrg_status() {
		return org_status;
	}

	public void setOrg_status(int org_status) {
		this.org_status = org_status;
	}

	public int getSys_group() {
		return sys_group;
	}

	public void setSys_group(int sys_group) {
		this.sys_group = sys_group;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public List<GroupUser> getLeaguers() {
		return leaguers;
	}

	public void setLeaguers(List<GroupUser> leaguers) {
		this.leaguers = leaguers;
	}

	/**
	 * 
	 * 2008-8-24,下午03:08:43
	 * @author wangkx 
	 * @version 2.0
	 *
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return dept_id + "/" + dept_name + "/" + super_id + "/" + node + "/" + org_phone + "/" + org_fax + "/" + state
				+ "/" + type + "/" + app_name + "/" + org_orderBy + "/" + sys_group + "/" + org_status;
	}

	public String getMemo1() {
		return memo1;
	}

	public void setMemo1(String memo1) {
		this.memo1 = memo1;
	}

	public String getMemo2() {
		return memo2;
	}

	public void setMemo2(String memo2) {
		this.memo2 = memo2;
	}

	public String getMemo3() {
		return memo3;
	}

	public void setMemo3(String memo3) {
		this.memo3 = memo3;
	}

	public String getMemo4() {
		return memo4;
	}

	public void setMemo4(String memo4) {
		this.memo4 = memo4;
	}

	public int getMemoNum() {
		return memoNum;
	}

	public void setMemoNum(int memoNum) {
		this.memoNum = memoNum;
	}

	public int getOrg_orderBy() {
		return org_orderBy;
	}

	public void setOrg_orderBy(int org_orderBy) {
		this.org_orderBy = org_orderBy;
	}
}
